from PIL import Image

# 打开图片
path= '../lib/aaa.jpg'
# 打开图片
image = Image.open(path)
# 调整图片大小
new_size = (300, 200)
resized_image = image.resize(new_size)
# 保存调整后的图片
resized_image.save('resized_example.jpg')    